package com.ruoyi.student.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.student.domain.vo.TStudentAnswerRecodeVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.student.mapper.TStudentAnswerRecodeMapper;
import com.ruoyi.student.domain.TStudentAnswerRecode;
import com.ruoyi.student.service.ITStudentAnswerRecodeService;

/**
 * 学生提交任务答案Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-09-13
 */
@Service
public class TStudentAnswerRecodeServiceImpl implements ITStudentAnswerRecodeService 
{
    @Autowired
    private TStudentAnswerRecodeMapper tStudentAnswerRecodeMapper;

    /**
     * 查询学生提交任务答案
     * 
     * @param id 学生提交任务答案主键
     * @return 学生提交任务答案
     */
    @Override
    public TStudentAnswerRecode selectTStudentAnswerRecodeById(Long id)
    {
        return tStudentAnswerRecodeMapper.selectTStudentAnswerRecodeById(id);
    }

    /**
     * 查询学生提交任务答案列表
     * 
     * @param tStudentAnswerRecode 学生提交任务答案
     * @return 学生提交任务答案
     */
    @Override
    public List<TStudentAnswerRecode> selectTStudentAnswerRecodeList(TStudentAnswerRecode tStudentAnswerRecode)
    {
        return tStudentAnswerRecodeMapper.selectTStudentAnswerRecodeList(tStudentAnswerRecode);
    }
    @Override
    public List<TStudentAnswerRecodeVo> selectTStudentAnswerRecodeVoList(TStudentAnswerRecode tStudentAnswerRecode)
    {
        return tStudentAnswerRecodeMapper.selectTStudentAnswerRecodeVoList(tStudentAnswerRecode);
    }

    /**
     * 新增学生提交任务答案
     * 
     * @param tStudentAnswerRecode 学生提交任务答案
     * @return 结果
     */
    @Override
    public int insertTStudentAnswerRecode(TStudentAnswerRecode tStudentAnswerRecode)
    {
        tStudentAnswerRecode.setCreateTime(DateUtils.getNowDate());
        return tStudentAnswerRecodeMapper.insertTStudentAnswerRecode(tStudentAnswerRecode);
    }

    /**
     * 修改学生提交任务答案
     * 
     * @param tStudentAnswerRecode 学生提交任务答案
     * @return 结果
     */
    @Override
    public int updateTStudentAnswerRecode(TStudentAnswerRecode tStudentAnswerRecode)
    {
        tStudentAnswerRecode.setUpdateTime(DateUtils.getNowDate());
        return tStudentAnswerRecodeMapper.updateTStudentAnswerRecode(tStudentAnswerRecode);
    }

    /**
     * 批量删除学生提交任务答案
     * 
     * @param ids 需要删除的学生提交任务答案主键
     * @return 结果
     */
    @Override
    public int deleteTStudentAnswerRecodeByIds(Long[] ids)
    {
        return tStudentAnswerRecodeMapper.deleteTStudentAnswerRecodeByIds(ids);
    }

    /**
     * 删除学生提交任务答案信息
     * 
     * @param id 学生提交任务答案主键
     * @return 结果
     */
    @Override
    public int deleteTStudentAnswerRecodeById(Long id)
    {
        return tStudentAnswerRecodeMapper.deleteTStudentAnswerRecodeById(id);
    }
}
